package abc.dev.auth.controller;

import java.util.HashMap;
import java.util.concurrent.ExecutionException;


import abc.base.AbcBaseController;
import abc.base.BaseModel;
import abc.base.BllFactory;
import abc.dev.auth.to.OnlineTo;
import abc.dev.auth.vo.OnlineVo;
import abc.enums.ActionType;
import abc.model.ResponseData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import abc.base.BaseController;
import org.springframework.web.client.RestTemplate;

/**
* <p>
    * 在线账号 前端控制器
    * </p>
*
* @author linlurui
*/
@Tag(name = "在线账号")
@RestController
@RequestMapping("/dev/auth/online")
public class OnlineController extends AbcBaseController<OnlineTo, OnlineVo> {

    @Autowired
    BllFactory bllFactory;

    @Autowired
    RestTemplate restTemplate;

    @Operation(description = "获取属性")
    @RequestMapping( value = "attrs/{id}", method = {RequestMethod.GET})
    public ResponseData<OnlineVo> getAttrs(@PathVariable("id") Long id) {
        BaseModel model = dataExecuor.getModel(this);
        model.setId(id);
        return bllFactory.getBll(this).call(model, ActionType.OTHER);
    }
}
